<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="cache-control" content="max-age=86400"/>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GBDK 2020 Docs: gbdk-lib/include/nes/metasprites.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GBDK 2020 Docs
   &#160;<span id="projectnumber">4.4.0</span>
   </div>
   <div id="projectbrief">API Documentation for GBDK 2020</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('nes_2metasprites_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">metasprites.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="nes_2metasprites_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#ifndef _METASPRITES_H_INCLUDE</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#define _METASPRITES_H_INCLUDE</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="nes_2hardware_8h.html">nes/hardware.h</a>&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;types.h&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="stdint_8h.html">stdint.h</a>&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structmetasprite__t.html">metasprite_t</a> {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <a class="code" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>  <a class="code" href="structmetasprite__t.html#a2c3fea1f6b3354352823320c69a3e4bb">dy</a>, <a class="code" href="structmetasprite__t.html#a67d2a6fb62059da39b54e975c4fbb324">dx</a>;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="structmetasprite__t.html#ad68b2f80c08f2f7fc603c56af2e75a6f">dtile</a>;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="structmetasprite__t.html#ab61e73a65c5e8cb30d0d81bb7845d615">props</a>;</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#aba6401cc8173158a9f37ee22094c03d3">   38</a></span>&#160;} <a class="code" href="gb_2metasprites_8h.html#aba6401cc8173158a9f37ee22094c03d3">metasprite_t</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#a9f9f390a57460914e27c7604b7d8379a">   40</a></span>&#160;<span class="preprocessor">#define metasprite_end -128</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#aa88dc4d5e35045509b8955a4a23a30aa">   41</a></span>&#160;<span class="preprocessor">#define METASPR_ITEM(dy,dx,dt,a) {(dy),(dx),(dt),(a)}</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#aa1d425dcce3cd104751744535b6a389a">   42</a></span>&#160;<span class="preprocessor">#define METASPR_TERM {metasprite_end}</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">void</span> * <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a>;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a4bfe4d95031b67951cf6bc342110db39">__render_shadow_OAM</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_flipx(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_flipy(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_flipxy(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_vflip(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_hflip(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_hvflip(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> __hide_metasprite(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#a72096a9bde11c6c34b5a0e756a63189a">   64</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="gb_2metasprites_8h.html#a7f682afd53ac62ba02b0b6bc18d9cae5">hide_sprites_range</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> from, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> to) <a class="code" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a>;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#aea470ec28599089b4ef6d4b0bb065ff3">   89</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a6a320e8632e35cba926e089b035146e1">move_metasprite_ex</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_prop, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) {</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    base_prop;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = base_prop;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">return</span> __move_metasprite(base_sprite, x, y);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;}</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#a58afd65e58ef341df1a9f82564162063">   99</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a77475e913bf0a19df28bdbf9d1cf392b">move_metasprite</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = 0;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">return</span> __move_metasprite(base_sprite, x, y);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;}</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#adcf30adc326753cb4dc60601c94513c0">  128</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a061cc1e8214c86414dc1d5017b9c8be2">move_metasprite_flipx</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_prop, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) {</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    base_prop;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = base_prop;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_flipx(base_sprite, x - 8, y);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;}</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#a5f770be62efaa5f0b4eabc8b40196e59">  138</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#aa8ff2df0679ebb0b6e0a8f6d83127e1a">move_metasprite_vflip</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) {</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = 0;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_vflip(base_sprite, x - 8, y);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;}</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#ad3fe7a507d4ff6aa8935c976cbfec6da">  168</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a4de12dbe1868a2a408e8ef583ccc9df1">move_metasprite_flipy</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_prop, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) {</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    base_prop;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = base_prop;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_flipy(base_sprite, x, y - ((<a class="code" href="nes_2hardware_8h.html#ae7753ae877137d76083b660aea9526b7">shadow_PPUCTRL</a> &amp; <a class="code" href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340">PPUCTRL_SPR_8X16</a>) ? 16 : 8) );</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;}</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160; </div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#ab326d76901c06a49257a9145b557af71">  178</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a27e3bb17d0458b60b1f0433f66301f46">move_metasprite_hflip</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = 0;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_hflip(base_sprite, x, y - ((<a class="code" href="nes_2hardware_8h.html#ae7753ae877137d76083b660aea9526b7">shadow_PPUCTRL</a> &amp; <a class="code" href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340">PPUCTRL_SPR_8X16</a>) ? 16 : 8) );</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;}</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#a428b96330e115d3eb6e7d9d71461dadb">  207</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a21a071eea8fb69b577cfcd86aad5bdac">move_metasprite_flipxy</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_prop, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) {</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    base_prop;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = base_prop;</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_flipxy(base_sprite, x - 8, y - ((<a class="code" href="nes_2hardware_8h.html#ae7753ae877137d76083b660aea9526b7">shadow_PPUCTRL</a> &amp; <a class="code" href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340">PPUCTRL_SPR_8X16</a>) ? 16 : 8));</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;}</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160; </div>
<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#aa02989a68e2d593872b851cd5ed17f1b">  217</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a32a61acd4a76d1de5814f7b94c8bc23f">move_metasprite_hvflip</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> x, <a class="code" href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a> y) {</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = 0;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_hvflip(base_sprite, x - 8, y - ((<a class="code" href="nes_2hardware_8h.html#ae7753ae877137d76083b660aea9526b7">shadow_PPUCTRL</a> &amp; <a class="code" href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340">PPUCTRL_SPR_8X16</a>) ? 16 : 8));</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;}</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160; </div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="nes_2metasprites_8h.html#af8de5a888d65448b9d34027a0e1ce906">  233</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="gb_2metasprites_8h.html#af8de5a888d65448b9d34027a0e1ce906">hide_metasprite</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite) {</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    __hide_metasprite(base_sprite);</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;}</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="aasm_2types_8h_html_a0971918860055db2e50dacea4da8f3bc"><div class="ttname"><a href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></div><div class="ttdeci">#define OLDCALL</div><div class="ttdef"><b>Definition:</b> types.h:21</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a061cc1e8214c86414dc1d5017b9c8be2"><div class="ttname"><a href="gb_2metasprites_8h.html#a061cc1e8214c86414dc1d5017b9c8be2">move_metasprite_flipx</a></div><div class="ttdeci">uint8_t move_metasprite_flipx(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:199</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a21a071eea8fb69b577cfcd86aad5bdac"><div class="ttname"><a href="gb_2metasprites_8h.html#a21a071eea8fb69b577cfcd86aad5bdac">move_metasprite_flipxy</a></div><div class="ttdeci">uint8_t move_metasprite_flipxy(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:280</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a27e3bb17d0458b60b1f0433f66301f46"><div class="ttname"><a href="gb_2metasprites_8h.html#a27e3bb17d0458b60b1f0433f66301f46">move_metasprite_hflip</a></div><div class="ttdeci">uint8_t move_metasprite_hflip(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:249</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a32a61acd4a76d1de5814f7b94c8bc23f"><div class="ttname"><a href="gb_2metasprites_8h.html#a32a61acd4a76d1de5814f7b94c8bc23f">move_metasprite_hvflip</a></div><div class="ttdeci">uint8_t move_metasprite_hvflip(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:289</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a345fa52509387bd18a4092178a18286f"><div class="ttname"><a href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a></div><div class="ttdeci">uint8_t __current_base_tile</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a4bfe4d95031b67951cf6bc342110db39"><div class="ttname"><a href="gb_2metasprites_8h.html#a4bfe4d95031b67951cf6bc342110db39">__render_shadow_OAM</a></div><div class="ttdeci">uint8_t __render_shadow_OAM</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a4de12dbe1868a2a408e8ef583ccc9df1"><div class="ttname"><a href="gb_2metasprites_8h.html#a4de12dbe1868a2a408e8ef583ccc9df1">move_metasprite_flipy</a></div><div class="ttdeci">uint8_t move_metasprite_flipy(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:240</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a6a320e8632e35cba926e089b035146e1"><div class="ttname"><a href="gb_2metasprites_8h.html#a6a320e8632e35cba926e089b035146e1">move_metasprite_ex</a></div><div class="ttdeci">uint8_t move_metasprite_ex(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:159</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a77475e913bf0a19df28bdbf9d1cf392b"><div class="ttname"><a href="gb_2metasprites_8h.html#a77475e913bf0a19df28bdbf9d1cf392b">move_metasprite</a></div><div class="ttdeci">uint8_t move_metasprite(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:168</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a7f682afd53ac62ba02b0b6bc18d9cae5"><div class="ttname"><a href="gb_2metasprites_8h.html#a7f682afd53ac62ba02b0b6bc18d9cae5">hide_sprites_range</a></div><div class="ttdeci">void hide_sprites_range(uint8_t from, uint8_t to)</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_aa8ff2df0679ebb0b6e0a8f6d83127e1a"><div class="ttname"><a href="gb_2metasprites_8h.html#aa8ff2df0679ebb0b6e0a8f6d83127e1a">move_metasprite_vflip</a></div><div class="ttdeci">uint8_t move_metasprite_vflip(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:208</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_aae51f066cc5436457f62351847bfc64b"><div class="ttname"><a href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a></div><div class="ttdeci">const void * __current_metasprite</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_aba6401cc8173158a9f37ee22094c03d3"><div class="ttname"><a href="gb_2metasprites_8h.html#aba6401cc8173158a9f37ee22094c03d3">metasprite_t</a></div><div class="ttdeci">struct metasprite_t metasprite_t</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_af2dc6b61dc598c155217788049a5416b"><div class="ttname"><a href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a></div><div class="ttdeci">uint8_t __current_base_prop</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_af8de5a888d65448b9d34027a0e1ce906"><div class="ttname"><a href="gb_2metasprites_8h.html#af8de5a888d65448b9d34027a0e1ce906">hide_metasprite</a></div><div class="ttdeci">void hide_metasprite(const metasprite_t *metasprite, uint8_t base_sprite)</div><div class="ttdef"><b>Definition:</b> metasprites.h:305</div></div>
<div class="ttc" id="anes_2hardware_8h_html"><div class="ttname"><a href="nes_2hardware_8h.html">hardware.h</a></div></div>
<div class="ttc" id="anes_2hardware_8h_html_a6d712a8ba6ec86c2937aeb1b8b36f340"><div class="ttname"><a href="nes_2hardware_8h.html#a6d712a8ba6ec86c2937aeb1b8b36f340">PPUCTRL_SPR_8X16</a></div><div class="ttdeci">#define PPUCTRL_SPR_8X16</div><div class="ttdef"><b>Definition:</b> hardware.h:16</div></div>
<div class="ttc" id="anes_2hardware_8h_html_ae7753ae877137d76083b660aea9526b7"><div class="ttname"><a href="nes_2hardware_8h.html#ae7753ae877137d76083b660aea9526b7">shadow_PPUCTRL</a></div><div class="ttdeci">__SHADOW_REG shadow_PPUCTRL</div><div class="ttdef"><b>Definition:</b> hardware.h:20</div></div>
<div class="ttc" id="astdint_8h_html"><div class="ttname"><a href="stdint_8h.html">stdint.h</a></div></div>
<div class="ttc" id="astdint_8h_html_a66634143db08bebe9b46ab4cb1fc6fd3"><div class="ttname"><a href="stdint_8h.html#a66634143db08bebe9b46ab4cb1fc6fd3">int16_t</a></div><div class="ttdeci">short int int16_t</div><div class="ttdef"><b>Definition:</b> stdint.h:44</div></div>
<div class="ttc" id="astdint_8h_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:51</div></div>
<div class="ttc" id="astdint_8h_html_aef44329758059c91c76d334e8fc09700"><div class="ttname"><a href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a></div><div class="ttdeci">signed char int8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:43</div></div>
<div class="ttc" id="astructmetasprite__t_html"><div class="ttname"><a href="structmetasprite__t.html">metasprite_t</a></div><div class="ttdef"><b>Definition:</b> metasprites.h:102</div></div>
<div class="ttc" id="astructmetasprite__t_html_a2c3fea1f6b3354352823320c69a3e4bb"><div class="ttname"><a href="structmetasprite__t.html#a2c3fea1f6b3354352823320c69a3e4bb">metasprite_t::dy</a></div><div class="ttdeci">int8_t dy</div><div class="ttdef"><b>Definition:</b> metasprites.h:103</div></div>
<div class="ttc" id="astructmetasprite__t_html_a67d2a6fb62059da39b54e975c4fbb324"><div class="ttname"><a href="structmetasprite__t.html#a67d2a6fb62059da39b54e975c4fbb324">metasprite_t::dx</a></div><div class="ttdeci">int8_t dx</div><div class="ttdef"><b>Definition:</b> metasprites.h:103</div></div>
<div class="ttc" id="astructmetasprite__t_html_ab61e73a65c5e8cb30d0d81bb7845d615"><div class="ttname"><a href="structmetasprite__t.html#ab61e73a65c5e8cb30d0d81bb7845d615">metasprite_t::props</a></div><div class="ttdeci">uint8_t props</div><div class="ttdef"><b>Definition:</b> metasprites.h:105</div></div>
<div class="ttc" id="astructmetasprite__t_html_ad68b2f80c08f2f7fc603c56af2e75a6f"><div class="ttname"><a href="structmetasprite__t.html#ad68b2f80c08f2f7fc603c56af2e75a6f">metasprite_t::dtile</a></div><div class="ttdeci">uint8_t dtile</div><div class="ttdef"><b>Definition:</b> metasprites.h:104</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
</div>
</body>
</html>
